home *** CD-ROM | disk | FTP | other *** search
/ Micromanía 90 / CDMM_90_1.ISO / Cycling Manager 2 / CyclingManager2Demo.exe / Disk1 / data1.cab / Game / DataCM2 / MenuServer / UserClient.cnh < prev   
Encoding:
Text File  |  2002-05-10  |  5.2 KB  |  230 lines

  1. func void GuestConnectCB (Net_Client _client);
  2. func void GuestDisconnectCB (Net_Client _client);
  3. func void UserDisconnectCB (Net_Client _client);
  4.  
  5.  
  6.  
  7. func void fnMSUserLogin ( szx _szLogin, szx _szPassword );
  8.  
  9. // *** database data ***
  10. func void fnUserToServerDatabase_Data(szx _szDatabaseName);
  11.  
  12. func void fnReadDB_Ready(i32x _iUserId,i32x _iDatabase);    /// Update client vote next phase/day or race
  13. func void fnReadDB_Invite(i32x _iUserId,i32x _iDatabase);    /// Update client race invitation
  14. func void fnReadDB_StratZone(i32x _iUserId,i32x _iDatabase);/// Update client strategy zones
  15. func void fnReadDB_CyclistStrat(i32x _iUserId,i32x _iDatabase);/// Update client cyclist strategy ID
  16. func void fnReadDB_EquipmentSelection(i32x _iUserId,i32x _iDatabase);/// Update client cyclist equipment selection
  17. func void fnReadDB_TrainingWeek(i32x _iUserId,i32x _iDatabase);    /// Update the training weeks of the team of the user
  18. func void fnReadDB_TrainingSeason(i32x _iUserId,i32x _iDatabase);    /// Update the training season of the team of the user
  19. func i32x fnReadDB_StaffRole(i32x _iUserId,i32x _iDatabase);    /// Update the staff role of the team of the user
  20. func i32x fnReadDB_HireStaff(i32x _iUserId,i32x _iDatabase);
  21. func i32x fnReadDB_LayoffStaff(i32x _iUserId,i32x _iDatabase);
  22. func i32x fnReadDB_Roster(i32x _iUserId,i32x _iDatabase);
  23.  
  24. // Temporary global
  25. var i32x g_iRoster[9];
  26.  
  27. // *** Subscribe/Unsubscribe ***
  28.  
  29. func void fnUserSubscribe ( i32x _iTeamID);
  30. func void fnUserInRaceUnsubscribe ( i32x _iTeamID);
  31. func void fnUserUnsubscribe ();
  32. func void fnUserUnsubscribeNull ();
  33.  
  34.  
  35.  
  36. // *** Admin ***
  37.  
  38. func void fnAdminKickUser(szx _szLogin);
  39.  
  40. // Vote test
  41. func void fnGameVote_Test();
  42.  
  43.  
  44. // *** InRace ***
  45.  
  46. func void StartUDP();
  47. func void StartUDP_Null();
  48. func void StopUDP();
  49. func void StopUDP_Null();
  50. func void fnGame_Chat(i32x _iSendToBitfield, szx _szMessage);
  51.  
  52.  
  53.  
  54.  
  55.  
  56. // *********************
  57. // * Incomming Messages
  58. // *********************
  59.  
  60. func void MSComponentDestroy(Gui_Component _poComponent);
  61.  
  62. message ComponentDestroy(Gui_Component _poComponent);
  63.  
  64. interface iAncestorInterface
  65. {
  66.     // guest connect
  67.     GuestConnectCB Connect;
  68.  
  69.     MSComponentDestroy ComponentDestroy;
  70. }
  71.  
  72.  
  73. // ** common guest/user **
  74.  
  75. interface iGuestUserInterface
  76. {
  77. }
  78.  
  79. class CGuestUser
  80. {
  81.     var i32x m_iUserId;
  82.     var szx m_szLogin;
  83.     var szx m_szPassword;
  84.     var Net_Client m_pClient;
  85. };
  86.  
  87.  
  88. // *** guest interface ***
  89.  
  90.  
  91. interface iGuestInterface
  92. {
  93.     // guest disconnect
  94.     GuestDisconnectCB            Disconnect;
  95. }
  96.  
  97.  
  98. interface iGuestLoginInterface
  99. {
  100.     // login
  101.     fnMSUserLogin mGame_UserLogin;
  102. }
  103.  
  104.  
  105. interface iGuestSubscribeInterface
  106. {
  107.     // subscribe
  108.     fnUserSubscribe            mGame_UserSubscribe;
  109. }
  110.  
  111. // *** guest data ***
  112.  
  113. class CBasicGuest
  114. {
  115. };
  116.  
  117. class CLoginGuest
  118. {
  119. };
  120.  
  121.  
  122. class CSubscribeGuest
  123. {
  124. };
  125.  
  126.  
  127. // *** user interface ***
  128.  
  129.  
  130. interface iUserInterface
  131. {
  132.     // chat 
  133.     fnGame_Chat mGame_Chat;
  134.  
  135.     // disconnect
  136.     UserDisconnectCB Disconnect;
  137.  
  138.     // database data
  139.     fnUserToServerDatabase_Data Database_Data;
  140.  
  141.     // unsubscribe
  142.     fnUserUnsubscribe        mGame_UserUnsubscribe;
  143.  
  144.     // udp connection
  145.     StopUDP     mStopUDP;
  146. }
  147.  
  148.  
  149. interface iInRace
  150. {
  151.     // unsubscribe
  152.     fnUserInRaceUnsubscribe        mGame_UserUnsubscribe;
  153.  
  154.     // udp connection
  155.     StartUDP mStartUDP;
  156.     StopUDP     mStopUDP;
  157.  
  158.  
  159.     //inrace interface management
  160.     I_IndividualOrder    mIndividualOrder;
  161. //    I_GroupOrder        mGroupOrder;
  162. //    I_GroupBehaviour    mGroupBehaviour;
  163.     I_AIBreak            mAIBreak;
  164.     I_AIWithdrawal        mAIWithdrawal;
  165.     I_AIAllWithdrawal    mAIAllwithdrawal;
  166.     I_AIFall            mAIFall;
  167.     PhysicDeltaPos        mPhysicDeltaPos;
  168.     PhysicDeltaSpeed    mPhysicDeltaSpeed;
  169.  
  170.     SetInRaceClientReady    mInRaceReady;
  171. }
  172.  
  173.  
  174. class CBasicUser
  175. {
  176. };
  177.  
  178.  
  179. class CInRaceUser
  180. {
  181. };
  182.  
  183.  
  184. // Game over interface
  185. interface iGameOver
  186. {
  187.     // unsubscribe
  188.     fnUserUnsubscribeNull    mGame_UserUnsubscribe;
  189.  
  190.     //Add iInRace void interface
  191.     StartUDP_Null mStartUDP;
  192.     StopUDP_Null mStopUDP;
  193.  
  194.     I_IndividualOrder_Null        mIndividualOrder;
  195.  
  196.     AIBreak_Null        mAIBreak;
  197.     AIWithDrawal_Null    mAIWithdrawal;
  198.     AIAllwithdrawal_Null     mAIAllwithdrawal;
  199.     AIFall_Null        mAIFall;
  200.     PhysicDeltaPos_Null        mPhysicDeltaPos;
  201.     PhysicDeltaSpeed_Null        mPhysicDeltaSpeed;
  202.  
  203.     InRaceReady_Null        mInRaceReady;
  204. }
  205.  
  206.  
  207. // ******************************
  208. // * Outgoing Messages
  209. // ******************************
  210.  
  211.  
  212. message mUser_GameGuestOK ();
  213. message mUser_GameSubscribeOK (i32x _iUserId);
  214. message mUser_GameUnsubscribeOK ();
  215. message mUser_GameSubscribeCancel();
  216. message mUser_GameUnsubscribeCancel();
  217. message mUser_GameLoginOK (i32x _iUserID);
  218. message mUser_InRaceStart (i32x _iIRteamID); // Tell the client that the RServer has started the race and send the InRaceTeamID
  219. message mUser_InRaceStop (); // Tell the client that the RServer has stopped the race
  220. message mUser_Chat(i32x _iUserId, szx _szMessage);
  221. message mUser_NotifyUserReady(i32x iUserID);
  222. message mUser_NotifyUserNotReady(i32x iUserID);
  223. message mUser_ForceRace();
  224.  
  225. //Client interface message
  226. message mCSendEvent(i32x _iEventType,i32x _iCyclistIndex,i32x _iParam1,i32x _iParam2,szx _szParam);
  227. message mCSendInterface(i32x _iCyclistIndexInTeam,f32x _fEffortSliderValue,f32x _fEffortMaxSliderValue);
  228. message mEndOfGameMode(i32x _iLastStageID);
  229.  
  230.